Manually Refetching Data in RTK Query
RTK Query automatically handles caching and background refetching, but it also allows you to manually trigger a refetch when needed. This is useful when data changes outside the app or after performing a mutation.
refetch method – Each query hook returns a refetch function that can be called to trigger a new request.useLazyQuery – Allows you to fetch data only when you explicitly trigger it.Manual refetching gives developers fine-grained control over when data should be refreshed — ideal for pull-to-refresh, retry buttons, or after performing specific actions.